feat(VEG-3619): Add connector bump command in zcli#325
Merged
zendesk-vishesh merged 1 commit intomasterfrom Mar 23, 2026
Merged
feat(VEG-3619): Add connector bump command in zcli#325zendesk-vishesh merged 1 commit intomasterfrom
zendesk-vishesh merged 1 commit intomasterfrom
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds the
connectors:bumpcommand to ZCLI, enabling users to bump or update connector versions using semantic versioning. The command accepts major, minor, and patch flags, defaulting to patch, following the same pattern as the existingapps:bumpcommand.Changes:
packages/zcli-connectors/src/commands/connectors/bump.ts- New bump command that increments connector versions insrc/index.tsusing semver.packages/zcli-connectors/src/templates/starter/src/index.ts- Addedversion: '0.0.1'field to the starter template so all new connectors include version by default.packages/zcli-connectors/src/commands/connectors/create.ts- Updated to preserve the version field during connector creation.Detail
Usage:
zcli connectors:bump # Bump patch (default): 1.0.0 → 1.0.1
zcli connectors:bump -m # Bump minor: 1.0.0 → 1.1.0
zcli connectors:bump -M # Bump major: 1.0.0 → 2.0.0
zcli connectors:bump -p # Bump patch (explicit): 1.0.0 → 1.0.1
Test Coverage:
Added comprehensive functional tests in packages/zcli-connectors/tests/functional/bump.test.ts
Successful Operations
Default bump - Bumps patch version when no flag specified (1.0.0 → 1.0.1).
Patch bump (-p) - Explicit patch increment (1.0.0 → 1.0.1).
Minor bump (-m) - Minor version increment (1.0.0 → 1.1.0).
Major bump (-M) - Major version increment (1.0.0 → 2.0.0).
Format Preservation
Single quote preservation - Maintains version: '1.0.0' format through bumps.
Double quote preservation - Maintains version: "1.0.0" format through bumps.
Whitespace preservation - Preserves original spacing around version field.
Error Handling
Missing directory error - Returns proper error when connector path is invalid.
Missing index.ts error - Returns proper error when src/index.ts doesn't exist.
Missing version field error - Returns proper error when version not found in manifest.
Invalid semver error - Returns proper error when version format is invalid.
Platform Compatibility
Cross-platform paths - Uses path.resolve() for OS-agnostic path handling (Windows/macOS/Linux).
Checklist